package com.woniu.controller;

import com.woniu.entity.Result;
import com.woniu.pojo.ServiceStatus;
import com.woniu.service.IServiceStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 服务标签表 前端控制器
 * </p>
 *
 * @author xiaotang
 * @since 2022-10-20
 */
@RestController
@RequestMapping("/serviceStatus")
@Api(tags = "服务状态管理")
public class ServiceStatusController extends BaseController{

    @Autowired
    private IServiceStatusService serviceStatusService;

    @ApiOperation("查询所有")
    @GetMapping
    public Result queryAll(){
        List<ServiceStatus> serviceStatusList = serviceStatusService.list();
        return toDataResult(serviceStatusList);
    }
}
